package com.xgg.taiwuinfo.gongfa.abilities;

import android.content.Context;

//运功时的行动能力
public class Ability_YunGong_Action
{
    final int Cast;
    final int Attack;
    final int Weapon ;
    final int MoveInterval;
    final int MoveDistance;

    public static final int Count = 5;

    public int getCast(){return Cast;}

    public int getAttack(){return Attack;}

    public int getWeapon(){return Weapon;}

    public int getMoveInterval(){return MoveInterval;}

    public int getMoveDistance(){return MoveDistance;}

    public Ability_YunGong_Action(int [] action)
    {
        Cast  = action[0];
        Attack  = action[1];
        Weapon  = action[2];
        MoveInterval  = action[3];
        MoveDistance  = action[4];
    }

    public String getDescString(Context ctx)
    {
        String rt = "";
        if (Cast !=  0) { String str = String.format("施展速度: +%d%%\r\n" , Cast); rt += str;}
        if (Attack !=  0) { String str = String.format("攻击速度: +%d%%\r\n" , Attack); rt += str;}
        if (Weapon !=  0) { String str = String.format("武器切换: +%d%%\r\n" , Weapon); rt += str;}
        if (MoveInterval !=  0) { String str = String.format("移动速度: +%d\r\n" , MoveInterval); rt += str;}
        if (MoveDistance !=  0) { String str = String.format("移动距离: +%d\r\n" , MoveDistance); rt += str;}
        return rt;
    }

}
